package com.techfengs.chapter04;

public class ArithmeticOperatorExcercise01 {
  public static void main(String[] args) {
    // P65 算术运算符练习1
    // 面试题1
    // ★★★
    int i = 1;
    i = i++;
    System.out.println(i);

    // 面试题2
    i = 1;
    i = ++i;
    System.out.println(i);

    // P66 算术运算符练习2
    int i1 = 10;
    int i2 = 20;
    i = i1++;
    System.out.println("i=" + i);
    System.out.println("i2=" + i2);
    i = --i2;
    System.out.println("i=" + i);
    System.out.println("i2=" + i2);
  }
}
